package org.example.manage.controller.statistics;

import org.example.api.statistics.StatisticsControllerApi;
import org.example.framework.model.response.ObjectResult;
import org.example.manage.service.statistics.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wwy
 * @Date: 2020/11/10 14:15
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController implements StatisticsControllerApi {
    @Autowired
    private StatisticsService statisticsService;

    @GetMapping("/authorBookNumSort")
    @Override
    public ObjectResult authorBookNumSort() {
        return statisticsService.authorBookNumSort();
    }

    @GetMapping("/publisherBookNumSort")
    @Override
    public ObjectResult publisherBookNumSort() {
        return statisticsService.publisherBookNumSort();
    }

    @GetMapping("/publisherYearBookNum")
    @Override
    public ObjectResult publisherYearBookNum() {
        return statisticsService.publisherYearBookNum();
    }

    @GetMapping("/authorRatingScoreSortBookNum")
    @Override
    public ObjectResult authorRatingScoreSortBookNum() {
        return statisticsService.authorRatingScoreSortBookNum();
    }

    @GetMapping("/priceScope")
    @Override
    public ObjectResult priceScope() {
        return statisticsService.priceScope();
    }
}
